Conditions | 4 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | const ModelDesk = require('../../model/catering/desk') |
||
12 | detail: async function (storeId, id) { |
||
13 | let result = await ModelDesk.first(id) |
||
14 | if (_.isEmpty(result)) { |
||
15 | throw new ApiError('common.notExist', 'desk') |
||
16 | } |
||
17 | |||
18 | if (result.store_id != storeId) { |
||
19 | throw new ApiError('common.notExist', 'desk') |
||
20 | } |
||
21 | |||
22 | if (result.status == -1) { |
||
23 | throw new ApiError('common.notExist', 'desk') |
||
24 | } |
||
25 | |||
26 | return result |
||
27 | }, |
||
28 | |||
61 |